package com.ruiyi.adrobot.mongo.device;

import com.ruiyi.adrobot.beans.Device;
import com.ruiyi.adrobot.beans.VirtualDevice;

import java.util.List;

public interface DeviceOperations {

    void insertAll(List<Device> devices);

    void buildModels();

    Device randomFindDeviceByAccountInfosFunNot(Integer fun);


    void insertVirtualDevice(Device device);

    Device findRandomDeviceByModelAndUsedFunsNot(String model, Integer fun);

    VirtualDevice findRandomDeviceByAccountInfosFunAndAccountInfosCreateDateBetween(Integer fun, String startDate, String endDate, String collection);

    Device findRandomDeviceByModelAndAccountInfosFunAndAccountInfosCreateDateBetween(String model, Integer fun, String startDate, String endDate);

    VirtualDevice findVirtualDeviceByImei(String imei);

    Device findRegexImei(String imei);

    VirtualDevice findRandomNotUsedVirtualDevice(Integer fun, String substring);

    Device findRandomModel();

    void saveOrUpdateVirtualDeviceAccounts(VirtualDevice virtualDevice);

    void updateProvinceIdAndCityId(Device excuteDevice, Integer province_id, Integer city_id);

    void removeUsedFunsById(String imei, Integer fun, Boolean virtual);

    void addOpenId();
}
